package myapp.framelibrary.http;

import android.text.TextUtils;

import java.util.List;

import myapp.framelibrary.db.DaoSupportFactory;
import myapp.framelibrary.db.IDaoSupport;

/**
 * Created by 超 on 2017/6/29.
 */

public class CacheDataUtil {
    public static String getCacheJson(){
            IDaoSupport<CacheData> dataDaoSupport = DaoSupportFactory.getFactroy().getDao(CacheData.class);
            List<CacheData> query = dataDaoSupport.query();
            if (query.size()!=0){
                CacheData cacheData = query.get(0);
                String resultJson = cacheData.getResultJson();
                if (!TextUtils.isEmpty(resultJson)){
                    return resultJson;
                }
            }
        return null;
    }


}
